﻿using InDbContext;
using System;

namespace In.Api.Helpers
{
    public static class HospWsLogHelper
    {
        public static void Log(string type, string request, string response)
        {
            using (var ctx = new HospDatabaseEntity())
            {
                ctx.Logs.Add(new Log()
                {
                    Action = type,
                    Request = request,
                    Response = response,
                    CreateDT = DateTime.Now
                });
                ctx.SaveChanges();

            }
        }
    }
}